<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>


    </title>
    <style>
        .box{
            box-sizing: border-box;
            width: 100px;
        height: 30px;
        padding: 0  50px;
            display: inline-block;
            border: 1px solid rebeccapurple;
        }
        .box span{
            width: 150px;
            display: inline-block;
        }
    </style>
</head>
<body>
    <div class="box">
        <span>测试内容</span>
    </div>
</body>
</html>